package org.huzhp.console.service;


import org.huzhp.console.entity.vo.GatewayRouteVo;
import org.huzhp.console.entity.vo.SentinelRuleVo;

import java.util.List;

/**
 * @Description: java类作用描述
 * @Author: huzp
 * @CreateDate: 2020/3/12 15:31
 * @Version: 1.0
 */
public interface IConsoleService {

    /**
     * 获取网关路由信息
     *
     * @param routeId
     * @return
     */
    GatewayRouteVo findRouteByRouteId(String routeId);

    /**
     * 保存路由信息
     *
     * @param route
     */
    void saveRoute(GatewayRouteVo route);

    /**
     * 删除路由
     *
     * @param routeId
     */
    void deleteRoute(String routeId);

    /**
     * 获取所有路由信息
     *
     * @return
     */
    List getAllRoutes();


    /**
     * 获取网关规则信息
     *
     * @param ruleResource
     * @return
     */
    SentinelRuleVo findRuleByRuleResource(String ruleResource);

    /**
     * 保存路由信息
     *
     * @param rule
     */
    void saveRule(SentinelRuleVo rule);

    /**
     * 删除路由
     *
     * @param ruleResource
     */
    void deleteRule(String ruleResource);

    /**
     * 获取所有规则信息
     *
     * @return
     */
    List getAllRules();
}
